package com.fc.entity.output;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fc.entity.Category;
import com.fc.entity.ProductDetailImages;
import com.fc.enums.UseStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class ProductOutput {
    @Schema(title = "id")
    private Long id;

    @Schema(title = "产品名称")
    private String name;

    @Schema(title = "产品价格")
    private BigDecimal price;

    @Schema(title = "库存数量")
    private Integer stock;

    @Schema(title = "产品封面")
    private String image;

    @Schema(title = "启用禁用")
    private UseStatus status;

    @Schema(title = "描述")
    private String description;

    @Schema(title = "产品类别")
    private List<Category> categories;

    @Schema(title = "产品详情图主图")
    private List<ProductDetailImages> mainImages;

    @Schema(title = "产品详情图副图")
    private List<ProductDetailImages> detailImages;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(title = "更新时间")
    private LocalDateTime updateTime;
}
